package JavaDesign.report_2.t_1;

/**
 * @author zouran
 * createDate：2023/9/27  1:36
 */
public class HardWork {
    public static void main(String[] args) {
        Employee[] e = new Employee[3];
        e[0] = new YearWorker(1, 150000);
        e[1] = new MonthWorker(2, 10000);
        e[2] = new WeekWorker(1, 400);
        double sum = 0;
        for (Employee employee : e) {
            sum += employee.earnings();
        }
        System.out.println("总工资为：" + sum);
    }

}
